from django.db import models


# Create your models here.
class HouseUser(models.Model):
    user_account = models.CharField(primary_key=True, max_length=20)
    user_password = models.CharField(max_length=20)

    class Meta:
        managed = False
        db_table = 'house_user'


class PurchasePeople(models.Model):
    cus_peo_id = models.CharField(primary_key=True, max_length=20)
    cus_peo_name = models.CharField(max_length=20)
    cus_peo_cell = models.BigIntegerField()
    cus_peo_type = models.CharField(max_length=20)
    house_peo_type = models.CharField(max_length=20)
    house_peo_area = models.IntegerField()
    ren_peo_situation = models.CharField(max_length=20)

    class Meta:
        managed = False
        db_table = 'purchase_people'


class RentingHouse(models.Model):
    cus_id = models.CharField(primary_key=True, max_length=20)
    cus_name = models.CharField(max_length=20)
    cus_cell = models.BigIntegerField()
    cus_type = models.CharField(max_length=20)
    cus_price = models.IntegerField()
    house_type = models.CharField(max_length=20)
    house_area = models.IntegerField()
    ren_situation = models.CharField(max_length=20)
    house_address = models.CharField(max_length=20)
    house_situation = models.CharField(max_length=20)

    class Meta:
        managed = False
        db_table = 'renting_house'


class SellHouse(models.Model):
    cell_id = models.CharField(primary_key=True, max_length=20)
    cell_name = models.CharField(max_length=20)
    cell_cell = models.BigIntegerField()
    cell_type = models.CharField(max_length=20)
    cell_price = models.IntegerField()
    house_type = models.CharField(max_length=20)
    house_area = models.IntegerField()
    ren_situation = models.CharField(max_length=20)
    house_address = models.CharField(max_length=20)
    house_situation = models.CharField(max_length=10)

    class Meta:
        managed = False
        db_table = 'sell_house'
